Telegram Group & Telegram Channel
Генераторы могут помочь при создании итераторов

Если создание собственного класса-итератора — редкость, то создание собственного итерабельного класса — не такая уж редкость. Итерабельный класс требует наличия метода iter, который возвращает итератор. Поскольку генераторы — это простой способ создания итератора, мы можем использовать функцию-генератор или выражение-генератор для создания наших методов iter.



tg-me.com/pythonist24/1285
Create:
Last Update:

Генераторы могут помочь при создании итераторов

Если создание собственного класса-итератора — редкость, то создание собственного итерабельного класса — не такая уж редкость. Итерабельный класс требует наличия метода iter, который возвращает итератор. Поскольку генераторы — это простой способ создания итератора, мы можем использовать функцию-генератор или выражение-генератор для создания наших методов iter.

BY Python обучающий




Share with your friend now:
tg-me.com/pythonist24/1285

View MORE
Open in Telegram


Python обучающий Telegram | DID YOU KNOW?

Date: |

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

Python обучающий from fr


Telegram Python обучающий
FROM USA